DISCUSSION
Before calling the
ATSUGetAttribute function, call the function
ATSUGetAllAttributes to obtain an array of the tags and data sizes corresponding to all previously set style run attribute values in a style object. To determine the value of a style run attribute identified by a particular style run attribute tag, you should pass the appropriate tag and data size pair passed back in the oAttributeInfoArray array of
ATSUGetAllAttributes to
ATSUGetAttribute.
If you do not know the size of the style run attribute value you wish to determine, call
ATSUGetAttribute twice:
-
Pass a reference to the style object containing the attribute in the iStyle parameter, NULL for the oValue parameter, and 0 for the other parameters. ATSUGetAttribute returns the size of the attribute value in the oActualValueSize parameter.
-
Allocate enough space for a value of the returned size, then call the function again, passing a pointer in the oValue parameter; on return, the pointer references the attribute value.